package com.songlanyun.modules.like.controller.api;

//import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;
import com.songlanyun.modules.account.controller.common.AbstractApiController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.songlanyun.modules.like.service.LikeRecordService;

import java.util.HashMap;
import java.util.Map;


/**
 * 点赞记录表
 *
 * @author wuchao
 * @email sunlightcs@gmail.com
 * @date 2021-02-24 17:19:32
 */
@RestController
@RequestMapping("api/like/record")
public class LikeRecordApiController extends AbstractApiController {
    @Autowired
    private LikeRecordService likeRecordService;


    /**
     * 我的点赞列表
     */
    @GetMapping("/list")
//    @RequiresPermissions("comment:userComment:list")
    public R list(@RequestParam Map<String, Object> params) {
        params.put("likeUserId", setUserId(params));
        PageUtils page = likeRecordService.myPage(params);

        return R.ok().put("page", page);
    }
}
